package com.tao.graduation.Dao;

import com.tao.graduation.Pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface AdminDao {
    List<Doctor> queryDoctor(Integer index,Integer LIMIT);
    int queryDoctorCount();
    int updateDoctor(Doctor doctor);
    int updateDoctorHP(Doctor doctor);
    int deleteDoctor(Integer id);
    int insertDoctorInfo(Doctor doctor);
    List<Doctor> searchDoctor(String name,String certId);

    List<Patient> queryPatient(Integer index,Integer LIMIT);
    int queryPatientCount();
    int updatePatient(Patient patient);
    int deletePatient(Integer id);
    int insertPatient(Patient patient);
    List<Patient> searchPatient(String name,String certId);

    List<Drugs> queryDrugs(Integer index,Integer LIMIT);
    int queryDrugsCount();
    int insertDrugs(Drugs drugs);
    int updateDrugs(Drugs drugs);
    int deleteDrugs(Integer id);
    List<Drugs> searchDrugs(String name,Integer number);

    List<Map<String,String>> queryOrder(Integer index,Integer LIMIT);
    int queryOrderCount();
    int deleteOrder(Integer id);
    List<Map<String,String>> searchOrder(String name,String doctorName);


    public List<News> queryNews(Integer index,Integer LIMIT);
    public int queryNewsCount();
    public int insertNews(News news);
    public int updateNews(News news);
    public int deleteNews(Integer id);
    List<News> searchNews(String title,String createTime);

    List<Map<String,Integer>> CountPeople(Integer year);
    List<Map<String,Object>> CountCost();


    int selectId(String name);

    List<Map<String,String>> queryHospital(Integer index,Integer LIMIT);
    int queryHospitalCount();

    int updateHospital(Integer id);

    List<Map<String,String>> queryResident(Integer index,Integer LIMIT);

    int queryResidentCount();


    List<Map<String,String>> queryScheduling(String option);

    List<Integer> querySchedulingCount(String option);

    List<String> querySchedulingName(String option);

    int insertScheduling(Scheduling scheduling);

    int deleteScheduling(Integer id);
}
